package com.zhehekeji.opsys.api.entity;

// Generated 2017-3-27 16:00:54 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TSigninExchange generated by hbm2java
 */
@Entity
@Table(name="t_signin_exchange")
public class TSigninExchange implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3349136195706894880L;
	private Long id;
	private String userId;
	private String mobile;
	private String prizeCode;
	private String prizeName;
	private Integer exchangeGold;
	private Date exchangeTime;
	private Long cpCode;
	private TSignin tsignin;
	
	private String cardNo;
	private String cardPwd;
	public TSigninExchange() {
	}

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="USER_ID",length=64,nullable=true)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	@Column(name="MOBILE",length=20,nullable=true)
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	@Column(name="PRIZE_CODE",length=64,nullable=true)
	public String getPrizeCode() {
		return this.prizeCode;
	}

	public void setPrizeCode(String prizeCode) {
		this.prizeCode = prizeCode;
	}
	@Column(name="PRIZE_NAME",length=128,nullable=true)
	public String getPrizeName() {
		return this.prizeName;
	}

	public void setPrizeName(String prizeName) {
		this.prizeName = prizeName;
	}
	@Column(name="EXCHANGE_GOLD",length=11,nullable=true)
	public Integer getExchangeGold() {
		return this.exchangeGold;
	}

	public void setExchangeGold(Integer exchangeGold) {
		this.exchangeGold = exchangeGold;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="EXCHANGE_TIME", nullable=true)
	public Date getExchangeTime() {
		return this.exchangeTime;
	}

	public void setExchangeTime(Date exchangeTime) {
		this.exchangeTime = exchangeTime;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return this.cpCode;
	}

	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="SIGNIN_ID")
	public TSignin getTsignin() {
		return tsignin;
	}

	public void setTsignin(TSignin tsignin) {
		this.tsignin = tsignin;
	}
	@Column(name="CARD_NO",length=32,nullable=true)
	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}
	@Column(name="CARD_PWD",length=32,nullable=true)
	public String getCardPwd() {
		return cardPwd;
	}

	public void setCardPwd(String cardPwd) {
		this.cardPwd = cardPwd;
	}

}
